#ifndef UTIL_H
#define UTIL_H

#include "def.h"

uint64_t hash(unsigned char *str);

void clip_string(char *, int max);
void clip_string_dotted(char *, int max);

track *create_track(uint64_t duration, char *file, char *album_tag, char *albumartist_tag, char *artist_tag, char *comment_tag, char *date_tag, char *genre_tag, char *title_tag, uint64_t discnumber_tag, uint64_t tracknumber_tag);
void destroy_track(track *track);
void print_track(track *track);

player *create_player(char *aaa_mode, char *status, uint64_t vol_left, uint64_t vol_right, uint64_t position, bool repeat, bool repeat_current, bool shuffle);
void destroy_player(player *player);
void print_player(player *player);

#endif